import request from '@/utils/request'

export function getAuthSession(){
    return request({
        url:'/api/auth/session',
        method:'get',
    })
}
export function getAccountsCheck(){
    return request({
        url:'/api/accounts/check',
        method:'get',
    })
}
export function getModels(){
    return request({
        url:'/api/models',
        method:'get',
    })
}
export function getConversationList(query){
    return request({
        url:`/api/conversations`,
        method:'get',
        params:query
    })
}
export function getConversationById(id){
    return request({
        url:`/api/conversation/${id}`,
        method:'get',
    })
}
export function conversationTalk(data){
    return request({
        url:`/api/conversation/talk`,
        method:'post',
        data:data
    })
}
export function editConversationById(query){
    return request({
        url:`/api/conversation/${query.id}`,
        method:'patch',
        data:query.data
    })
}
export function deleteConversationById(id){
    return request({
        url:`/api/conversation/${id}`,
        method:'delete',
    })
}
export function inferConversationTitle(query){
    return request({
        url:`/api/conversation/gen_title/${query.id}`,
        method:'post',
        data:query.data
    })
}